<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>微信授权</title>
</head>
<body>
<script>
    var CORPID = 'wx79a5ef0d247e5fe6';
    var redirect_uri = encodeURIComponent('http://shuyuan.itanggula.com/dj-oauth2.html');
    var url = "https://open.weixin.qq.com/connect/oauth2/authorize?" +
            "appid="+CORPID+"&redirect_uri="+redirect_uri+"&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
    window.location.href = url;
</script>
</body>
</html>